<?php

namespace plugin\ycMassage\app\model;


class MassageUserAgentApply extends Model
{
    public static function onAfterRead($model)
    {
        $model->agent_level = '总代理';
        if ($model->area_id) {
            $model->agent_level = "{$model->area}代理";
        } elseif ($model->city_id) {
            $model->agent_level = "{$model->city}代理";
        } elseif ($model->province_id) {
            $model->agent_level = "{$model->province}代理";
        }
    }
}
